using System.Data;
using ET;
namespace DA
{
	public class National_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdNational(string keywords)
	{
        return cls.Search("sp_tb_National_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdNationalDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool InsertNational(National_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@National_Alias", data.National_Alias);
	cls.AddParameter("@National_Name", data.National_Name);
	cls.AddParameter("@National_Note", data.National_Note);
    cls.ExecuteNonQuery("sp_tb_National_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool UpdateNational(National_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@National_Id", data.National_Id);
	cls.AddParameter("@National_Alias", data.National_Alias);
	cls.AddParameter("@National_Name", data.National_Name);
	cls.AddParameter("@National_Note", data.National_Note);
    cls.ExecuteNonQuery("sp_tb_National_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool DeleteNational(int id)
	{
        cls.Delete("sp_tb_National_Delete", "@National_Id", id);
	return true;
	}
	#endregion
	}
}